<div class="bdlccc bdrccc gadiend-white">
    <div class="pt4 pb4 pl4 pr4">
        <h4 class="pl8 pt7 pb8 pr8 ovfh mt0 mb0 mr0 ml0 bdbccc">
            Thông tin đơn hàng
        </h4>
        <div class="pl8 pr8 pt8 pb8 mt0 mb0 ml0 mr0 ovfa enableselect">
            {{if isset($Data["OBJ"])}}
                {{$order=$Data["OBJ"]}}
                {{$order["OrderDetail"]=objectToArray(json_decode($Data["OBJ"]["OrderDetail"]))}}
                <fieldset style="margin-bottom: 8px">
                    <input type="hidden" class="txtID" value="{{$order["OrderID"]}}"/>
                    <table>
                        <tr>
                            <td>Mã Đơn Hàng:</td>
                            <td class="pr12"><b>{{$order["OrderID"]}}</b></td>
                            <td>Mã Khách Hàng:</td>
                            <td class="pr12"><b>{{$order["CustomerID"]}}</b></td>
                            <td>Tình Trạng</td>
                            <td>
                                <select onchange="myjqxGrid.StatusChange('{{$order["OrderID"]}}',$(this).val())"  class="classic-select">
                                    <option {{if $order["Status"]=="New"}}selected="1"{{/if}} value="New">Mới lập</option>
                                    <option {{if $order["Status"]=="Confirmed"}}selected="1"{{/if}} value="Confirmed">Đã xác nhận</option>
                                    <option {{if $order["Status"]=="Shipping"}}selected="1"{{/if}} value="Shipping">Đang giao hàng</option>
                                    <option {{if $order["Status"]=="Finished"}}selected="1"{{/if}} value="Finished">Đã hoàn thành</option>
                                    <option {{if $order["Status"]=="Canceled"}}selected="1"{{/if}} value="Canceled">Đã hủy</option>
                                </select>
                                
                            </td>
                        </tr>
                        <tr>
                            <td>Ngày Lập:</td>
                            <td class="pr12"><b>{{$order["Insert"]}}</b></td>
                            <td>Mã Sản Phẩm</td>
                            <td class="pr12"><b><a href="{{base_url()}}san-pham/{{$order["Alias"]}}" target="_blank">{{$order["OrderDetail"]["Product"]["ProductID"]}}</a></b></td>
                            <td>Hình thức thanh toán</td>
                            <td><b>{{$order["OrderDetail"]["PayInfo"]["PayType"]}}</b></td>
                        </tr>
                        <tr>
                            <td>Thành Tiền:</td>
                            <td class="pr12"><b>{{number_format($order["Monney"]-$order["OrderDetail"]["ShipInfo"]["ShipCash"], 0, ',', '.')}}</b></td>
                            <td>Phí Vận Chuyển</td>
                            <td class="pr12"><b>{{number_format($order["OrderDetail"]["ShipInfo"]["ShipCash"], 0, ',', '.')}}</b></td>
                            <td>Tổng Thành Tiền</td>
                            <td><b>{{number_format($order["Monney"], 0, ',', '.')}}</b></td>
                        </tr>

                    </table>
                    <table style="margin-top: 12px">
                        <tr>
                            <td>Thông tin sản phẩm </td>
                            <td>[ Tại thời điểm lập đơn hàng ]</td>
                        </tr>
                        <tr>
                            <td></td>
                            <td>
                                <table>
                                    <tr>
                                        <td>Tên Sản Phẩm:</td>
                                        <td class="pr12"><b><a href="{{base_url()}}san-pham/{{$order["Alias"]}}" target="_blank">{{$order["OrderDetail"]["Product"]["ProductName"]}}</a></b></td>
                                    </tr>
                                    <tr>
                                        <td>Giá Bán:</td>
                                        <td class="pr12"><b>{{number_format($order["OrderDetail"]["Product"]["UnitsOnOrder"], 0, ',', '.')}}</b></td>
                                    </tr>
                                    <tr>
                                        <td>Số Lượng:</td>
                                        <td class="pr12"><b>{{$order["Amount"]}}</b></td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                    <table style="margin-top: 12px">
                        <tr>
                            <td>Thông tin người nhận: </td>
                            <td></td>
                        </tr>
                        <tr>
                            <td></td>
                            <td>
                                <table>
                                    <tr>
                                        <td>Người nhận:</td>
                                        <td class="pr12"><b>{{$order["OrderDetail"]["ShipInfo"]["ShipName"]|escape:'html'}}</b></td>
                                    </tr>
                                    <tr>
                                        <td>Điện thoại:</td>
                                        <td class="pr12"><b>{{$order["OrderDetail"]["ShipInfo"]["ShipPhone"]|escape:'html'}}</b></td>
                                    </tr>
                                    <tr>
                                        <td>Địa chỉ :</td>
                                        <td class="pr12"><b>{{$order["OrderDetail"]["PayInfo"]["strShipAddress"]|escape:'html'}}</b></td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td>Ghi chú :</td>
                            <td><b><pre style="white-space: pre-wrap;
                                        white-space: -moz-pre-wrap;
                                        white-space: -pre-wrap;
                                        white-space: -o-pre-wrap;
                                        word-wrap: break-word;">{{$order["OrderDetail"]["ShipInfo"]["ShipNote"]}}</pre> </b></td>
                        </tr>
                    </table>
                <!--    <pre>{{print_r($order)}}</pre>-->
                </fieldset>
            {{else}}
                No data to display.
            {{/if}}
            <style type="text/css">
                table.classic-table{display:  inline-block;border-collapse: collapse;}
                table.classic-table th,table.classic-table td{border: 1px solid #d7d7d7;display: table-cell; padding: 4px 8px}
                table.classic-table tr{display: table-row}
            </style>


        </div>
        <div class="clear"></div>
    </div>
</div>